<template>
  <a-back-top
    :visibility-height="200"
    @click="goTop"
  >
    <div class="back-to-top-content">
      <UpCircleOutlined />
    </div>
  </a-back-top>
</template>

<script lang="ts" setup>
import { UpCircleOutlined } from '@ant-design/icons-vue'

const goTop = () => {
  window.scrollTo({ top: 0, behavior: 'smooth' })
}
</script>

<style scoped>
.back-to-top-content {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 40px;
  width: 40px;
  background-color: #f5f5f5;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}
</style>
